﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="Pragma" content="no-cache" />
    <meta http-equiv="Cache-Control" content="no-cache" />
    <meta http-equiv="Expires" content="0" />
    <title></title>
    <link rel="stylesheet" type="text/css" href="/ViewV5/CSS/bootstrap3.3.5/css/bootstrap.css">
    <link href="/ViewV5/CSS/BootOver.css" rel="stylesheet" />
    <script type="text/javascript" src="/ViewV5/JS/jquery-1.11.2.min.js"></script>
    <script src="/ViewV5/JS/avalon1.47.js"></script>
    <script type="text/javascript">

        var model = avalon.define({
            $id: "APP_LCSP_SEL",
            LCTypeData: [],
            LCLBData: [],
            GetLCTypeData: function () {
                //获取主要菜单
                $.getJSON('/API/VIEWAPI.ashx?Action=LCSP_GETWFPDLIST', { P1: 1 }, function (resultData) {
                    if (resultData.ErrorMsg == "") {
                        model.LCTypeData = resultData.Result;
                        var tempdata = [];
                        for (var i = 0; i < resultData.Result.length; i++) {
                            if ($.inArray(resultData.Result[i].RelatedTable, tempdata) == -1) {
                                tempdata.push(resultData.Result[i].RelatedTable)
                            }
                        }
                        model.LCLBData = tempdata;
                    }
                })
            },
            SelLCFun: function (item) {
                window.location.href = "/ViewV5/AppPage/APP_ADD_WF.html?FormCode=LCSP&PDID=" + item.ID + "&lctype=" + item.ProcessType;
            }
        });
        avalon.ready(function () {
            model.GetLCTypeData();
        })
    </script>
</head>
<body>
    <div class="container-fluid maindiv" style="margin: 20px" id="dvContent" ms-controller="APP_LCSP_SEL">
        <div ms-repeat-lb="LCLBData" >
            <div class="formtitle"><span>{{lb}}</span></div>
            <div class="pCard" ms-repeat-el="LCTypeData"  ms-visible="el.RelatedTable==lb"  style="width: 160px; text-align: center; min-width: 110px; background-color: transparent;" ms-attr-title="el.ProcessName" ms-click="SelLCFun(el)">
                <div style="height: 90px;margin-top:20px">
                    <span class="glyphicon glyphicon-list-alt" style="font-size: 80px; color: #66c9f3"></span>
                </div>
                <div class="pName" style="max-width: 160px">{{el.ProcessName}}</div>
            </div>
        </div>
    </div>
</body>
</html>
